package org.aiforum.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/*
 * 模板实体类
 */
@NamedQueries({@NamedQuery(name="queryPlateByState",query="from Plate p where p.plateState=:plateState")})
@Entity
@Table(name="ai_plate")
public class Plate {
	 @Id //标识属性为主键
     @GeneratedValue(strategy=GenerationType.SEQUENCE,generator="plate_sequence")//标识主键生成器
	 @SequenceGenerator(sequenceName="SEQ_PLATE",name="plate_sequence",initialValue=1,
			 allocationSize=1)//标识定义序列生成器
	 private int plateId;
	 @Column(name="plateName")//板块名称
	 private String plateName;
	 @Column(name="plateDescribe")//板块描述
	 private String plateDescribe;
	 @Column(name="plateState")//板块状态
	 private int  plateState;
	 
	 //提供无参构造方法
	public Plate(){}
	public int getPlateId() {
		return plateId;
	}
	public void setPlateId(int plateId) {
		this.plateId = plateId;
	}
	public String getPlateName() {
		return plateName;
	}
	public void setPlateName(String plateName) {
		this.plateName = plateName;
	}
	public String getPlateDescribe() {
		return plateDescribe;
	}
	public void setPlateDescribe(String plateDescribe) {
		this.plateDescribe = plateDescribe;
	}
	public int getPlateState() {
		return plateState;
	}
	public void setPlateState(int plateState) {
		this.plateState = plateState;
	}
}
